home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
bootup
/
boot_a2m
/
msbt35e
/
batch.doc
< prev
next >
Wrap
Text File
|
1995-05-02
|
9KB
|
297 lines
Mouse Boot Batch file processor
(C)1992 - SRL
Written By Scott R. Lemmon
NOTE: this program is not included with the shareware release of Mouse
Boot but will be sent along with the registered owner disk to anyone who
sends the $15.00 Shareware fee for Mouse Boot (I figure only a few people
will need this kind of stuff anyway). The documentation is provided here
so you know what you'll be getting.
In order to give Mouse Boot maximum flexibility for advanced users and
yet retain its small size and simple operation, Mouse Boot 3d.4 now has
the ability to invoke a batch file processor. files with the extender
.BAT can be placed in the MOUSEBT directory and then chosen via Mouse
Boot in the same way as desktops and assign.sys files.
After Mouse Boot has finished its normal job of renaming files, it
will run the batch processor program; this, in turn, will search for and
run a file with the extension .BAT in the MOUSEBT folder.
As with all things mouse boot - you only need worry about this feature
if you want to use it, otherwise, with no batch files or BATCH.PRG in the
MOUSEBT folder, Mouse Boot will operate exactly as before.
An alternate way to use BATCH.PRG is by using Install Application, or
with the newdesk TOS or NeoDesk by draging a batch file to BATCH.PRG.
To create a batch file use any text editor (or a word processor, but
save the file in ASCII format).
A Mouse Boot batch file has the following format-
This is a Fake
batch file
#command
pathname
pathname
#command
pathname
#end
All commands, which may be typed in upper or lower case, are preceded
with an '#' and are followed on each line by whatever inputs they require.
Any other text will be ignored and can be used for comments - "#end" marks
the end of the file (what a surprise, huh?).
>> BATCH FILE COMMANDS <<
#COPY
<source pathname (including wildcards)>
<destination path (minus a filename)>
This is the wild card copy command, all the files matching path1 will
be copied to path2. It can be used to load Ramdisks or copy any file (or
group of files anywhere)
Example: (copies Acc's from root dir to a folder)
#copy
c:\*.AC?
c:\accfolder\
#DELETE
<pathname to delete (including wildcards)>
This will delete selected files from a directory - you can use
wildcards to specify which files are to be deleted. This command,
however, will not delete files in any other directory than the one
specified - so C:\*.*, for example, would not erase the entire partition
(unless you kept everything in the root directory).
Example: (delete all files with the extension .BAK)
#delete
f:\wordproc\*.bak
#ECOPY (copy and modify extension)
<source pathname (including wildcards)>
<destination path (minus filename)>
<extension to give destination>
This command works like COPY except that all files copied will be
renamed with the extension specified. - this (along with ERENAME) can be
used to turn files on or off.
Example: (copy all ACC or ACX files to a directory naming them all ACC)
#ecopy
c:\*.ac?
e:\accstuff\
acc
#ERENAME (Extension rename)
<pathname (including wildcards)>
<new extension>
This command will rename all matching files with the specified
extension - useful for switching files on or off
Example: (shut off all auto folder programs named "Phil")
#erename
c:\auto\*phil*.pr?
prx
#RENAME
<old pathname (including wildcards)>
<new pathname>
Just your basic rename command - nothing too special, but the "new"
pathname may use a different path from the "old" effectively moving a file
by only moving its name (and not its data), but the drive should be the
same. Though this only renames a single file, the source path may use
wildcards - the first file matched will be used.
Example:
#rename
c:\phildog.erk
c:\wafer\philcat.erk
#RCOPY (copy and rename)
<source pathname (including wildcards)>
<destination pathname>
Copies a file giving it a new name in the process, like rename this is
a single file command but the source can use wildcards - this feature
could be used, for example, to copy the active desktop in the MOUSEBT
folder (since there will only be one) to some destination giving it the
name DESKTOP.INF.
Example:(and even sillier than the last one)
#rcopy
c:\philber?.knz
F:\moose\lamma\yak\wafting\deeppile.rug
#DCREATE
<pathname>
Create a directory (folder) in the specified path - really only useful
during bootup to make directories on a ramdisk.
Example: (make a folder "maudlin" inside "echidna")
#dcreate
d:\echidna\maudlin
Conditional Commands:
Version 1.1 of the batch file processor will let you perform
certain actions only if the screen resolution is correct. This can
allow you to have a specific set of commands to be run for each
screen rez.
#IF REZ
<screen resolution name>
#endif
This command will only perform the commands between #IF REZ and
#ENDIF if the current screen resolution matches the name under #IF REZ.
Please take note that #IF REZ commands should not be nested.
The resolution names the command knows are:
st low - standard ST "LOW"
st medium - standard ST "MEDIUM"
st high - standard ST "HIGH"
tt medium - TT MEDIUM resolution
tt high - TT LOW resolution
ultra high - anything higher (like Moniterms)
TT LOW is not supported as it is not really useful as a boot
resolution and ST LOW is only supported for the hell of it. If
anyone wants TT LOW and is a registered owner of Mouse Boot ask me and
I'll add it.
Also note that BATCH.PRG has no way of knowing if the resolution
will be switched by a desktop.inf or newdesk.inf file so the
resolution used will be the one used at the time BATCH.PRG runs.
Example: (copy two different INF files depending of rez.)
#if rez
st medium
#rcopy
c:\echidna\fish.med
c:\fish.inf
#endif
#if rez
st high
#rcopy
c:\echidna\fish.hig
c:\fish.inf
#endif
#ON REZ (on resolution)
<Screen resoultion name one>
Stuff to do
#break
<Screen resolution name two>
other stuff to do
#break
<Screen resoultion name ...>
etc. etc.
#endif
This command, like #IF REZ, is useful for choosing between actions
depending on resolution; however, it works a bit different. Only the
commands between the matching resolution and the #BREAK or #ENDIF command
will be performed, and any number of resolutions may be listed. The
resolution names are the same as with #IF REZ.
Example: Chooses between YAK.INF files depending on resolution.
#on rez
st medium
#rcopy
d:\yak\yakmed.inf
C:\yak.inf
#break
st high
#rcopy
d:\yak\yakhigh.inf
c:\yak.inf
#break
ultra high
#rcopy
d:\yak\yakmon.inf
c:\yak.inf
#endif
Special Commands:
In order to help "debug" your batch files two commands have been
included to allow you to see what it's doing. Otherwise only errors will
be shown on the screen during batch file processing.
#ECHO - this will toggle display of the batch file on or off. When on,
the batch file will be echoed to the screen along with the names
of all files matching any wildcard commands.
#PAUSE - this will stop batch processing until a key is pressed
(to let you read the screen)
This is may seem like a simple set of commands (for example, wildcards
in the destination path are not supported) but it is not intended to be a
fully functional CLI - it does, however, allow mouse Boot to perform very
complex tasks upon boot-up and should meet most needs. If interest is high
enough, I will write a more advanced version.
Quick command listing:
#copy - wildcard copy command
#delete - trash a file or files
#ecopy - copy and add a new filename extension
#erename - change the extension name on a group of files
#rename - change the name of a file
#rcopy - copy and rename
#dcreate - make a folder
#if rez - do commands only if screen rez. matches
#on rez - do commands between matching rez. and #break
#break - used between #on rez and #endif to separate resolutions
#endif - marks end of area affected by #if rez or #on rez commands
#echo - show batch file on screen during processing
#pause - wait for a keypress
#end - marks end of batch file